<?php
/**
 * @user:andy
 * @date:2021/7/19
 * @company:http://www.sjdphp.com
 * @desc:
 */

namespace app\admin\validate;


use think\Validate;

class ShipValidate extends Validate
{
    protected $rule = [
        'ship_id' => 'require|number',
        'ship_name' => 'require',
        'ship_path' => 'require',
    ];

    protected $message = [
        'ship_id.require'   => '友情链接ID不能为空',
        'ship_id.number'    => '友情链接ID不合法',
        'ship_name.require' => '友情链接名称不能为空',
        'ship_path.require' => '友情链接路径不能为空'
    ];

    protected $scene = [
        'add'  => ['ship_name','ship_path'],
        'edit' => ['ship_name','ship_path','ship_id'],
    ];
}